home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / SamplePart (C++) / SamplePart.make < prev   
Encoding:
Text File  |  1995-12-06  |  9.5 KB  |  282 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        SamplePart.make
  3. #
  4. #    Contains:    Makefile for OpenDoc SamplePart viewer
  5. #
  6. #    Written by:    Steve Smith
  7. #
  8. #    Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  9. #
  10.  
  11. #---------------------------------------------------------------------------    
  12. # PROJECT VARIABLES
  13. #---------------------------------------------------------------------------    
  14.  
  15. TargetName = SamplePart
  16. TargetNameILink = {TargetName} (68k)
  17. TargetNamePPCLink = {TargetName} (PPC)
  18. TargetNameFat = {TargetName} (fat)
  19.  
  20. TargetCreatorType = SPVW
  21.  
  22. AdditionalIncludes = -i "{somSourceDir}" -i "{SourceDir}"
  23. AdditionalIDLIncludes = -i "{SourceDir}"
  24.  
  25. #---------------------------------------------------------------------------    
  26. # CFM/PEF Version Numbers
  27. #---------------------------------------------------------------------------    
  28. # For detailed instructions on proper CFM/PEF version numbering, see
  29. # Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
  30. #---------------------------------------------------------------------------    
  31.  
  32. CurrentLibraryVersion =        0x01018000        # 1.0.1 Final
  33. LibraryExportsVersion =        0x00000000        # 0.0
  34. LibraryCodeVersion =        0x00000000        # 0.0
  35.  
  36. #---------------------------------------------------------------------------    
  37. # DIRECTORY DEPENDENCIES
  38. #---------------------------------------------------------------------------    
  39.  
  40. "{TargetDir}"  ƒ "{SourceDir}"
  41. "{ObjectsDir}" ƒ "{SourceDir}"
  42. "{ObjectsDir}" ƒ "{somSourceDir}"
  43. "{ObjectsDir}" ƒ "{ODUtilsImplDir}"
  44.  
  45. #---------------------------------------------------------------------------    
  46. # ROOT TARGET
  47. #---------------------------------------------------------------------------    
  48.  
  49. BUILDPPCLINK ƒ ∂
  50.     "{CppPrecompiledHeaders}"                ∂
  51.     "{TargetDir}{TargetNamePPCLink}"        ∂
  52.     "{somSourceDir}som_SamplePart.exp"
  53.  
  54. BUILDREZ ƒ ∂
  55.     "{ObjectsDir}{TargetName}.PPC.rsrc"        ∂
  56.     "{ObjectsDir}{TargetName}.68k.rsrc"
  57.  
  58. BUILDILINK ƒ ∂
  59.     "{CppPrecompiledHeaders}"                ∂
  60.     "{TargetDir}{TargetNameILink}"            ∂
  61.     "{somSourceDir}som_SamplePart.exp"
  62.  
  63. BUILDIDL ƒ ∂
  64.     "{somSourceDir}som_SamplePart.xih"        ∂
  65.     "{somSourceDir}som_SamplePart.xh"        ∂
  66.     "{somSourceDir}som_SamplePart.cpp"        ∂
  67.     "{somSourceDir}som_SamplePart.exp"
  68.     
  69.  
  70. #---------------------------------------------------------------------------    
  71. # FILE LIST VARIABLES
  72. #---------------------------------------------------------------------------    
  73.  
  74. SamplePartOBJECTS = ∂
  75.     "{ObjectsDir}SamplePartGlobals.cpp.o"    ∂
  76.     "{ObjectsDir}SamplePart.cpp.o"            ∂
  77.     "{ObjectsDir}SamplePartUtils.cpp.o"        ∂
  78.     "{ObjectsDir}SampleCollections.cpp.o"    ∂
  79.  
  80. somSamplePartOBJECTS = ∂
  81.     "{ObjectsDir}som_SamplePartInit.cpp.o"    ∂
  82.     "{ObjectsDir}som_SamplePart.cpp.o"        ∂
  83.  
  84. OpenDocUtilityOBJECTS = ∂
  85.     "{ObjectsDir}AltPoint.cpp.o"             ∂
  86.     "{ObjectsDir}AltPoly.cpp.o"             ∂
  87.     "{ObjectsDir}BndNSUtl.cpp.o"             ∂
  88.     "{ObjectsDir}Crawl.cpp.o"                 ∂
  89.     "{ObjectsDir}DocUtils.cpp.o"             ∂
  90.     "{ObjectsDir}Except.cpp.o"                 ∂
  91.     "{ObjectsDir}FocusLib.cpp.o"             ∂
  92.     "{ObjectsDir}IText.cpp.o"                 ∂
  93.     "{ObjectsDir}FlipEnd.cpp.o"             ∂
  94.     "{ObjectsDir}ISOStr.cpp.o"                 ∂
  95.     "{ObjectsDir}LinkList.cpp.o"             ∂
  96.     "{ObjectsDir}NmSpcUtl.cpp.o"             ∂
  97.     "{ObjectsDir}ODDebug.cpp.o"             ∂
  98.     "{ObjectsDir}ODMemory.cpp.o"            ∂
  99.     "{ObjectsDir}ODNew.cpp.o"                ∂
  100.     "{ObjectsDir}ODUtils.cpp.o"                ∂
  101.     "{ObjectsDir}PasclStr.cpp.o"            ∂
  102.     "{ObjectsDir}PlfmFile.cpp.o"             ∂
  103.     "{ObjectsDir}StorUtil.cpp.o"            ∂
  104.     "{ObjectsDir}StdTypIO.cpp.o"            ∂
  105.     "{ObjectsDir}TempIter.cpp.o"            ∂
  106.     "{ObjectsDir}TempObj.cpp.o"                ∂
  107.     "{ObjectsDir}UseRsrcM.cpp.o"             ∂
  108.     "{ObjectsDir}WinUtils.cpp.o"             ∂
  109.             
  110.             
  111. #---------------------------------------------------------------------------    
  112. # DEPENDENCIES
  113. #---------------------------------------------------------------------------    
  114.  
  115. # --- IDL ---
  116.  
  117. "{somSourceDir}"som_SamplePart.cpp ƒ    ∂
  118.     "{somSourceDir}"som_SamplePart.idl    ∂
  119.     "{ODIDLIntfDir}"Part.idl
  120.     
  121. "{somSourceDir}"som_SamplePart.xih ƒ    ∂
  122.     "{somSourceDir}"som_SamplePart.xh    ∂
  123.     "{somSourceDir}"som_SamplePart.idl    ∂
  124.     "{SourceDir}SamplePartVers.h"        ∂
  125.     "{ODIDLIntfDir}"Part.idl
  126.     
  127. "{somSourceDir}"som_SamplePart.xh ƒ        ∂
  128.     "{somSourceDir}"som_SamplePart.idl    ∂
  129.     "{SourceDir}SamplePartVers.h"        ∂
  130.     "{ODIDLIntfDir}"Part.idl
  131.  
  132. # --- SOURCE ---
  133.  
  134. "{ObjectsDir}SamplePart.cpp.o"    ƒ            ∂
  135.     "{CppPrecompiledHeaders}"                ∂
  136.     "{SourceDir}SamplePart.cpp"             ∂
  137.     "{SourceDir}SamplePart.h"                 ∂
  138.     "{SourceDir}SamplePartDef.h"             ∂
  139.     "{SourceDir}SamplePartUtils.h"
  140.     
  141. "{ObjectsDir}SamplePartUtils.cpp.o"    ƒ        ∂
  142.     "{CppPrecompiledHeaders}"                ∂
  143.     "{SourceDir}SamplePartUtils.cpp"        ∂
  144.     "{SourceDir}SamplePartUtils.h"
  145.  
  146. "{ObjectsDir}SampleCollections.cpp.o"    ƒ    ∂
  147.     "{CppPrecompiledHeaders}"                ∂
  148.     "{SourceDir}SampleCollections.cpp"        ∂
  149.     "{SourceDir}SampleCollections.h"
  150.  
  151. # --- SOM OBJECTS ---
  152.  
  153. "{ObjectsDir}som_SamplePart.cpp.o"    ƒ        ∂
  154.     "{CppPrecompiledHeaders}"                ∂
  155.     "{somSourceDir}som_SamplePart.cpp"        ∂
  156.     "{somSourceDir}som_SamplePart.xih"        ∂
  157.     "{SourceDir}SamplePart.h"
  158.  
  159. "{ObjectsDir}som_SamplePartInit.cpp.o"    ƒ    ∂
  160.     "{CppPrecompiledHeaders}"                ∂
  161.     "{somSourceDir}som_SamplePartInit.cpp"    ∂
  162.     "{somSourceDir}som_SamplePart.xh"
  163.  
  164.  
  165. #---------------------------------------------------------------------------    
  166. # BUILD LIBRARIES
  167. #---------------------------------------------------------------------------    
  168.  
  169. # --- 68k Link ---
  170.  
  171. "{TargetDir}{TargetNameILink}" ƒƒ      {SamplePartOBJECTS}            ∂
  172.                                      {somSamplePartOBJECTS}            ∂
  173.                                      {OpenDocUtilityOBJECTS}        ∂
  174.                                      "{somSourceDir}som_SamplePart.exp"
  175.     Echo Linking: {TargetNameILink}
  176.     {LinkTool}    ∂
  177.         -export `ConvertExportList "{somSourceDir}som_SamplePart.exp"` ∂
  178.         {ILinkOptions}                                        ∂
  179.         {ILinkShLibOptions}                                    ∂
  180.         -init SamplePartCFMInit                                ∂
  181.         -vercur {CurrentLibraryVersion}                        ∂
  182.         -verdef {LibraryExportsVersion}                        ∂
  183.         -verimp {LibraryCodeVersion}                        ∂
  184.         {ShLibPreLibraries}                                    ∂
  185.         {SamplePartOBJECTS}                                    ∂
  186.         {somSamplePartOBJECTS}                                ∂
  187.         {OpenDocUtilityOBJECTS}                                ∂
  188.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  189.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  190.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  191.         "{ODCFMLibrariesDir}OpenDoc Imaging.stub"            ∂
  192.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  193.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  194.         {ShLibPostLibraries}                                ∂
  195.         -o "{ObjectsDir}{TargetNameILink}".seg
  196.     If !{Status}
  197.         Echo Building: {TargetNameILink}.SYM
  198.         {SymTool} "{ObjectsDir}{TargetNameILink}".seg.NJ    ∂
  199.                 -o "{TargetDir}{TargetNameILink}".SYM -sym 3.2
  200.         Echo Building: {TargetNameILink}∂'s code∂/data fragment
  201.         MakeFlat "{ObjectsDir}{TargetNameILink}".seg -o "{TargetDir}{TargetNameILink}"
  202.         Echo Copying: {TargetNameILink}∂'s resources
  203.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.68k.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  204.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNameILink}"
  205.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  206.     End
  207.  
  208. # --- PowerPC Link ---
  209.  
  210. "{TargetDir}{TargetNamePPCLink}" ƒƒ        {SamplePartOBJECTS}            ∂
  211.                                         {somSamplePartOBJECTS}        ∂
  212.                                         {OpenDocUtilityOBJECTS}        ∂
  213.                                         "{somSourceDir}som_SamplePart.exp"
  214.     Echo Linking: {TargetNamePPCLink}
  215.     {LinkTool}    ∂
  216.         -export `ConvertExportList "{somSourceDir}som_SamplePart.exp"` ∂
  217.         {PPCLinkOptions}                                    ∂
  218.         {PPCLinkShLibOptions}                                ∂
  219.         -init SamplePartCFMInit                                ∂
  220.         -verCur {CurrentLibraryVersion}                        ∂
  221.         -verDef {LibraryExportsVersion}                        ∂
  222.         -verImp {LibraryCodeVersion}                        ∂
  223.         {PPCShLibPreLibraries}                                ∂
  224.         {SamplePartOBJECTS}                                    ∂
  225.         {somSamplePartOBJECTS}                                ∂
  226.         {OpenDocUtilityOBJECTS}                                ∂
  227.         "{ODCFMLibrariesDir}OpenDoc Core.stub"                ∂
  228.         "{ODCFMLibrariesDir}OpenDoc User Interface.stub"    ∂
  229.         "{ODCFMLibrariesDir}OpenDoc Storage.stub"            ∂
  230.         "{ODCFMLibrariesDir}OpenDoc Imaging.stub"            ∂
  231.         "{ODCFMLibrariesDir}OpenDoc Layout.stub"            ∂
  232.         "{ODCFMLibrariesDir}Memory Manager.stub"            ∂
  233.         {PPCShLibPostLibraries}                                ∂
  234.         -o "{ObjectsDir}{TargetNamePPCLink}"
  235.     If !{Status}
  236.         Move -y "{ObjectsDir}{TargetNamePPCLink}" "{TargetDir}"
  237.         Echo Building: {TargetNamePPCLink}.xSYM
  238.         {SymTool} "{ObjectsDir}{TargetNamePPCLink}".xcoff            ∂
  239.                 {AdditionalIncludes} -i "{ODUtilsImplDir}"            ∂
  240.                 -sym on,3.2 -o "{TargetDir}{TargetNamePPCLink}".xSYM
  241.         Echo Copying: {TargetNamePPCLink}∂'s resources
  242.         Echo "include ∂"{RsrcObjectsDir}{TargetName}.PPC.rsrc∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  243.         Echo "delete 'ckid';"  | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  244.         SetFile -a Bi -c "{TargetCreatorType}" {Targ}
  245.     End
  246.  
  247.  
  248. #---------------------------------------------------------------------------    
  249. # REZ STEPS
  250. #---------------------------------------------------------------------------    
  251.  
  252. "{RsrcObjectsDir}{TargetName}.PPC.rsrc"    ƒ                                ∂
  253.                                         "{SourceDir}SamplePart.r"        ∂
  254.                                         "{SourceDir}SamplePartDef.h"    ∂
  255.                                         "{SourceDir}SamplePartVers.h"    ∂
  256.                                         "{SourceDir}SamplePartOtherResources.rsrc"
  257.     Echo Rezzing: {TargetName}.r (for PPC)
  258.     Rez {RezOptions} {ODRezIntf} "{SourceDir}{TargetName}.r" -o {targ}
  259.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  260.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  261.     if ( `exists "{TargetDir}{TargetNamePPCLink}" != ""` )
  262.         Echo Copying: {TargetNamePPCLink}∂'s resources
  263.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNamePPCLink}"
  264.     end
  265.     
  266.  
  267. "{RsrcObjectsDir}{TargetName}.68k.rsrc"    ƒ                                ∂
  268.                                         "{SourceDir}SamplePart.r"        ∂
  269.                                         "{SourceDir}SamplePartDef.h"    ∂
  270.                                         "{SourceDir}SamplePartVers.h"    ∂
  271.                                         "{SourceDir}SamplePartOtherResources.rsrc"
  272.     Echo Rezzing: {TargetName}.r (for 68k)
  273.     Rez -d _68KBUILD_ {RezOptions} {ODRezIntf} "{SourceDir}{TargetName}.r" -o {Targ} 
  274.     Echo "delete 'ckid';"  | Rez -a -o {Targ}
  275.     SetFile -a i -c "{ResEditCreator}" -t "{ResEditFileType}" {Targ}
  276.     if ( `exists "{TargetDir}{TargetNameILink}" != ""` )
  277.         Echo Copying: {TargetNameILink}∂'s resources
  278.         Echo "include ∂""{Targ}"∂";" | Rez -a -o "{TargetDir}{TargetNameILink}"
  279.     end
  280.  
  281.  
  282.